For my Advanced Computer Graphics class, I was assigned with building, from scratch, a particle system. Coding was done in C++ with OpenGL for rendering. Note: it was a requirement of the class to also use glut, hence glut is required in order to run this project.
The purpose of the coursework is to introduce new modelling techniques other than polygonal models. Hence we were required to choose a scenario that exhibited behavior suitable for a particle system. The project is all OOP; each particle rendered is itself an object of a class.
Below is a mini "walkthrough" of the project.
I chose to model a wintry scene; one that incorporates snow for it would be a useful topic to explore and is relatively straightforward
Nice. Users can increase the number of snowflakes by hitting p.
As we can see, the framerate is pinned to the upper-left corner of the screen (among other properties of the system). It seems to have dropped significantly in the change from 1000 to 8000 particle objects. A workaround for this is to render 4 snowflakes per snowflake object (so whilst we see 8000 snowflakes, there are 2000 objects, each which are rendered as 4 seperate flakes).
That's a better framerate.
One thing to note about the scenario is that it isn't terribly exciting: it looks a bit dull. I introduced a second particle system, one that represents an open flame, to bring excitement to the scene. Each particle that makes up the flame (about 2700 in total here) has a material emissive property, meaning that the lighting of the scene don't influence the final colour - instead they "emit" light. In fact there is a light, positioned at the base of the flame that emits a glow that obeys an inverse square relationship, so it quickly fades out and gives a realistic effect (this is the quadratic attenutation component of the light).
Combined together, the scene looks as follows. This is a nice blend of two simple particle system ideas that present a convincing scene that only took 8-10 hours to make from initial idea to finished product.
This piece of university coursework obtained a first class honours mark.
Particle System
Published:

Particle System

This is my coursework assignment for the "Advanced Computer Graphics" module at university. The assignment entailed building a particle system fr Read More

Published: